package com.visionork.android.tai.activity;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class TaiMainActivity extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tai_main_tab);
        
        initTab();
    }

	private void initTab() {
		TabHost tabHost = getTabHost();
		TabHost.TabSpec spec;
		Intent intent;

		Resources res = getResources();
		
		intent = new Intent(this, VarietyShowListActivity.class);
		spec = tabHost.newTabSpec(res.getString(R.string.tab_show_tag))
				.setIndicator(res.getString(R.string.tab_show))
				.setContent(intent);
		tabHost.addTab(spec);
		
		intent = new Intent(this, DramaListActivity.class);
		spec = tabHost.newTabSpec(res.getString(R.string.tab_drama_tag))
				.setIndicator(res.getString(R.string.tab_drama))
				.setContent(intent);
		tabHost.addTab(spec);
		
		intent = new Intent(this, FavoriteProgramListActivity.class);
		spec = tabHost.newTabSpec(res.getString(R.string.tab_favorite_tag))
				.setIndicator(res.getString(R.string.tab_favorite))
				.setContent(intent);
		tabHost.addTab(spec);		
		
		intent = new Intent(this, NewEpisodeListActivity.class);
		spec = tabHost.newTabSpec(res.getString(R.string.tab_new_tag))
				.setIndicator(res.getString(R.string.tab_new))
				.setContent(intent);
		tabHost.addTab(spec);
	}
}